<!--********************************************************************
* Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title data-i18n="GISdemo"></title>
    <script type="text/javascript" src="js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" exclude="iclient-classic" src="dist/classic/include-classic.js"></script>
<script type="text/javascript">
    var map, layer,url = "http://127.0.0.1:8090/iserver/services/map-ugcv5-World/rest/maps/World";
	var scales = [1/295829355.454566,1/147914677.727283,1/73957338.8636414,1/36978669.4318207,1/18489334.7159104];
	//var scales = [1/295829355.454566];
    //初始化地图
    map = new SuperMap.Map("map", {
        controls: [
            new SuperMap.Control.Navigation()]
    });
    //map.addControl(new SuperMap.Control.MousePosition());
    //初始化图层
    //layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", url, {transparent: true, cacheEnabled:true}, {maxResolution: "auto",scales:scales});
    //监听图层信息加载完成事件
    //layer.events.on({"layerInitialized": addLayer});
    //function addLayer() {
    //    map.addLayers([layer,vectorLayer]);
        //显示地图范围
    //    map.setCenter(new SuperMap.LonLat(0,0), 0);	
    //}
	//url = "${layerName}_${w}x${h}/${scale}/${x}/${y}.${format}";
	url = "http://127.0.0.1:8080/World/P8_256_DCF34B56FIX/${scale}/${x}/${y}.png";
	layer = new SuperMap.Layer.SimpleCachedLayer("World",url,{transparent: true, cacheEnabled:true}, {maxResolution: "auto",scales:scales});
	map.addLayer(layer);
</script>
</body>
</html>